import webapp2
import jinja2
import os
import urllib
import json


JINJA_ENVIRONMENT = jinja2.Environment(
    loader=jinja2.FileSystemLoader(os.path.dirname(__file__)),
    extensions=['jinja2.ext.autoescape'])

class ButtonPage(webapp2.RequestHandler):

	def get(self):
		self.response.headers['Content-Type'] = 'text/html'
		template = JINJA_ENVIRONMENT.get_template('button.html')
		self.response.write(template.render({}))

	def sample_json_object(self):
		self.response.headers['Content-Type'] = 'text/json'
		foo = {'foo': 4098, 'bar': 4139}
		self.response.write(json.dumps(foo))




